package com.java.basis.collection;

import java.util.LinkedList;

/**
 * LinkedList 集合的使用
 * 存储结构：双向链表
 *
 * @author wangning
 * @create 2021-04-10 22:30
 */
public class TestLinkedList01 {
	public static void main(String[] args) {
		LinkedList linkedList = new LinkedList<>();

		Student s1 = new Student("刘德华", 21);
		Student s2 = new Student("郭富城", 22);
		Student s3 = new Student("梁朝伟", 18);

		linkedList.add(s1);
		linkedList.add(s2);
		linkedList.add(s3);
		System.out.println("linkedList = " + linkedList.size());
		System.out.println("linkedList = " + linkedList.toString());
	}
}
